/*
 * Copyright 2020 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import 'mixins';

.bx--data-table-container.kui--data-table-container-with-toolbars.kui--data-table-container-with-title {
  padding-top: 0;
}

.kui--data-table-toolbar {
  .kui--toolbar-button-with-icon {
    padding: 3px;
  }
}
.kui--toolbar-button-with-icon {
  &[data-enabled='true'] {
    svg {
      fill: var(--color-base0D);
      path {
        /* give the enabled button a bit more weight */
        stroke: var(--color-base0D);
        stroke-width: 1.1;
      }
    }
  }
  &[data-enabled='false'] svg {
    fill: var(--color-base05);
  }
}

body[kui-theme-style] .kui--toolbar-alert.bx--toast-notification {
  position: unset;
  width: inherit;
  margin-right: 0.5rem;
  margin-left: 0.5rem;

  &.bx--toast-notification__subtitle > p {
    font-size: 14px;
  }
}

.kui--data-table-toolbar-bottom {
  display: flex;
  height: 2rem;
}

@include TableToolbarButtons {
  display: flex;
}

body[kui-theme-style] .kui--data-table-toolbar {
  nav[aria-label='Breadcrumb'] {
    overflow-x: unset;
  }

  .kui--toolbar-button-with-icon {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* so that buttons are flush-left and pagination is flush-right */
  .kui--data-table-toolbar-filler {
    flex: 1;
  }

  .kui--data-table-toolbar-pagination.bx--pagination {
    display: flex;
    border: none;
    background-color: transparent;
    width: unset;
    align-items: unset;

    .kui--data-table-toolbar-pagination-info {
      white-space: pre; /* see padStart in Toolbar.tsx */
      color: var(--color-text-02);
      flex: 1;
      padding: 0 1.25rem;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      border: none;
    }
  }
}
